//
//  MainViewController.swift
//  SwiftWeiBoLearn
//
//  Created by zxj on 14/05/18.
//  Copyright © 2018年 zxj. All rights reserved.
//

import UIKit

class MainViewController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let childHomeVc = HomeTableViewController()
        childHomeVc.title="Home"
        let childHomeNavVc = UINavigationController(rootViewController: childHomeVc)
        addChildViewController(childHomeNavVc)
        
        let childDiscoverVc = DiscoverTableViewController()
        childDiscoverVc.title="Discover"
        let childDiscoverNavVc = UINavigationController(rootViewController: childDiscoverVc)
        addChildViewController(childDiscoverNavVc)
        
        let childMessageVc = MessageTableViewController()
        childMessageVc.title="Message"
        let childMessageNavVc = UINavigationController(rootViewController: childMessageVc)
        addChildViewController(childMessageNavVc)
        
        let childProfileVc = ProfileTableViewController()
        childProfileVc.title="Profile"
        let childProfileNavVc = UINavigationController(rootViewController: childProfileVc)
        addChildViewController(childProfileNavVc)
        
        
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
